package com.think.oauth.user.dao.user;

import java.util.Set;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.think.oauth.user.model.Role;

@Mapper
public interface RoleDao extends BaseMapper<Role> {
	@Select("select * from  think_role where role_id in(select role_id from think_user_role where user_id = #{userId}) AND client=#{client}")
    Set<Role> getUserRoles(@Param("userId")Integer userId,@Param("client")String client);
}
